<?php
namespace app\yticnus\Controller;
class Horn extends Common {

	/*
	*	构造函数
	*/
	function __construct(){
		parent::__construct();
    }
    
 	/*
	*	banner列表界面
    */
    public function index(){
        if(request()->isPost()){
            $horn = input('horn');
            $data['horn'] = $horn;
            $res = db('web_set')->where('id',1)->update($data);
            if($res){
                $this->success('操作成功',url('horn/index'));
            }else{
                $this->error('操作失败');
            }
        }
        $list = db('web_set')->where('id',1)->field('horn')->find();
        $this->assign('data',$list);
        return $this->fetch();
    }
}